package org.daidai.abstrusewriting.homepage.classify.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2016/11/1.
 */

public class TabItem implements Parcelable{

    @SerializedName("keywordName")
    private String keywordName;
    @SerializedName("categoryId")
    private int  categoryId;
    @SerializedName("realCategoryId")
    private int  realCategoryId;
    @SerializedName("keywordType")
    private int  keywordType ;


    @SerializedName("keywordId")
    private long keywordId;

    public TabItem() {
    }

    protected TabItem(Parcel in) {
        keywordName = in.readString();
        categoryId = in.readInt();
        realCategoryId = in.readInt();
        keywordType = in.readInt();
        keywordId = in.readLong();
    }

    public static final Creator<TabItem> CREATOR = new Creator<TabItem>() {
        @Override
        public TabItem createFromParcel(Parcel in) {
            return new TabItem(in);
        }

        @Override
        public TabItem[] newArray(int size) {
            return new TabItem[size];
        }
    };

    public long getKeywordId() {
        return keywordId;
    }

    public void setKeywordId(long keywordId) {
        this.keywordId = keywordId;
    }

    public String getKeywordName() {
        return keywordName;
    }

    public void setKeywordName(String keywordName) {
        this.keywordName = keywordName;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public int getRealCategoryId() {
        return realCategoryId;
    }

    public void setRealCategoryId(int realCategoryId) {
        this.realCategoryId = realCategoryId;
    }

    public int getKeywordType() {
        return keywordType;
    }

    public void setKeywordType(int keywordType) {
        this.keywordType = keywordType;
    }


    @Override
    public String toString() {
        return "TabItem{" +
                "keywordName='" + keywordName + '\'' +
                ", categoryId=" + categoryId +
                ", realCategoryId=" + realCategoryId +
                ", keywordType=" + keywordType +
                ", keywordId=" + keywordId +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(keywordName);
        dest.writeInt(categoryId);
        dest.writeInt(realCategoryId);
        dest.writeInt(keywordType);
        dest.writeLong(keywordId);
    }
}
